package org.ricks.net.action;

import org.ricks.ioc.event.IEvent;
import org.ricks.net.action.context.FlowContext;
import org.ricks.net.action.context.head.HeadMeta;

public class ActionExceptionEvent<T extends HeadMeta> implements IEvent {

    private final ActionReceiver receiver;
    private final FlowContext<T> context;  // 使用 T 替代 FlowContext，确保类型安全
    private final Throwable throwable;

    public ActionExceptionEvent(ActionReceiver receiver, FlowContext<T> context, Throwable throwable) {
        this.receiver = receiver;
        this.context = context;
        this.throwable = throwable;
    }

    // Getter/Setter 保持与字段类型一致
    public ActionReceiver getReceiver() {
        return receiver;
    }


    public FlowContext<T> getContext() {  // 返回类型改为 T
        return context;
    }


    public Throwable getThrowable() {
        return throwable;
    }

}
